<?=$this->load->view('include_header',null)?>
	<div id="top-panel">
		<div id="panel">
			<ul>
				<li class="current"><a href="<?=site_url('archive/idcard/'.$id)?>" class="report"><?=(empty($id))?"录入新":"编辑"?>客户基本信息</a></li>
				<?php if(!empty($info->id)):?><li><a id="printInfo" class="folder_table">打印本页信息</a></li><?php endif;?>
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<div id="box">
<!-- table begin -->
<form method="post" id="form"  enctype="multipart/form-data" action="<?=site_url('schengen/fr_studentex_update/'.$cateid)?>">

	<h3>法国学生签证附表</h3>
    <table width="100%">
    <thead>
        <tr>
          <td colspan="4" align="right"><img src="<?= (@$info->avatar)?@$info->avatar:'images/avatar.gif'?>" width="150" height="150" /></td>
		  <td align="right">
		  上传照片<br />
		  <input type="file" name="userphoto" /><br />
		  (.gif|.jpg|.png文件,最大1M)<br />
		  <?php if (@$info->attachment):?><a href="<?= @$info->attachment?>" target="_blank">点击下载附件</a><?php endif; ?>
		  &nbsp;&nbsp;&nbsp;&nbsp;上传附件<br />
		  <input type="file" name="userfile" /><br />
		  (.pdf|.zip|.rar|.doc,最大2M)		  
		  </td>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="5" align="right">			
			<input type="hidden" name="id" value="<?=$id?>" />
			<input id="button1" type="submit" value="提交信息" />
			<input id="button2" type="reset" value="重置" />
			</td>
        </tr>
    </tfoot>

    <tbody>
        <tr class="odd">
            <td>NOM DE NAISSANCE</td>
            <td><input type="text" name="surname" value="<?= @$info->surname?>" /></td>
            <td>&nbsp;</td>
            <td>NOM D’EPOUSE</td>
            <td><input type="text" name="former" value="<?= @$info->former?>" /></td>
        </tr>
        <tr class="even">
            <td>PRENOM</td>
            <td><input type="text" name="firstname" value="<?= @$info->firstname?>" /></td>
            <td>&nbsp;</td>
            <td>SEXE</td>
            <td><input type="radio" name="sex" value="1" <?= (@$info->sex==1)?'checked':''?> />
              MASCULIN
                <input type="radio" name="sex" value="2" <?= (@$info->sex==2)?'checked':''?> />
              FEMININ</td>
        </tr>
        <tr class="odd">
            <td>NE(E)</td>
            <td colspan="4">LE <select name="birth_d"><?php for($i=1;$i<=31;$i++) echo "<option value='$i'".((@$info->birth_d==$i)?"selected":"").">$i</option>"; ?></select> / <select name="birth_m"><?php for($i=1;$i<=12;$i++) echo "<option value='$i'".((@$info->birth_m==$i)?"selected":"").">$i</option>"; ?></select> / <select name="birth_y"><?php for($i=date("Y");$i>1940;$i--) echo "<option value='$i'".((@$info->birth_y==$i)?"selected":"").">$i</option>"; ?></select>              
               A : 
              <input type="text" name="birth_place" value="<?= @$info->birth_place?>" />              
               PAYS 
              <input type="text" name="birth_country" value="<?= @$info->birth_country?>" /></td>
        </tr>
        <tr class="even">
            <td>NATIONALITE</td>
            <td><input type="text" name="nationality" value="<?= @$info->nationality?>" /></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr class="odd">
            <td>SITUATION FAMILIALE</td>
            <td colspan="4">
			<input type="radio" name="marital_status" value="1" <?= (@$info->marital_status==1)?'checked':''?>/>
			CELIBATAIRE  &nbsp;&nbsp;
			<input type="radio" name="marital_status" value="2" <?= (@$info->marital_status==2)?'checked':''?>/>			 MARIE
			<input type="radio" name="marital_status" value="3" <?= (@$info->marital_status==3)?'checked':''?>/>
             VEUF 
             <input type="radio" name="marital_status" value="4" <?= (@$info->marital_status==4)?'checked':''?>/>
              DIVORCE 
              <input type="radio" name="marital_status" value="5" <?= (@$info->marital_status==5)?'checked':''?>/>               SEPARE</td>
        </tr>
        <tr class="even">
          <td>FILIATION			  </td>
		  <td colspan="4">PERE&nbsp;&nbsp;&nbsp; NOM 
		    <input type="text" name="father_surname" value="<?= @$info->father_surname?>" />		    
		     PRENOM 
		     <input type="text" name="father_firstname" value="<?= @$info->father_firstname?>" />
		     <br />
		     MERE&nbsp;&nbsp;&nbsp; NOM DE NAISSANCE
             <input type="text" name="mother_surname" value="<?= @$info->mother_surname?>" />
PRENOM
<input type="text" name="mother_firstname" value="<?= @$info->mother_firstname?>" /></td>
        </tr>
        <tr class="odd">
            <td>PASSEPORT</td>
            <td colspan="4">NUMERO 
              <input type="text" name="travel_document_num" value="<?= @$info->travel_document_num?>" />              
               <br />
               DELIVRE LE 
               <input type="text" name="travel_document_issue_date" value="<?= @$info->travel_document_issue_date?>" id="travel_document_issue_date"/>
A :
<input type="text" name="travel_document_issue_place" value="<?= @$info->travel_document_issue_place?>" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">CADRE RESERVE AU CONSULAT<br />
              Cachet :
              <input type="text" name="stamp" value="<?= @$info->stamp?>" />               <br />
              Motif de l’entrée :              
              <input type="radio" name="purpose" value="1" <?= (@$info->purpose==1)?'checked':''?>/>
              CONJOINT DE FRANCAIS 
              <input type="radio" name="purpose" value="2" <?= (@$info->purpose==2)?'checked':''?>/>
ETUDIANT 
<input type="radio" name="purpose" value="3" <?= (@$info->purpose==3)?'checked':''?>/>
VISITEUR 
<input type="radio" name="purpose" value="4" <?= (@$info->purpose==4)?'checked':''?>/>
MENTION SALARIE 
<input type="radio" name="purpose" value="5" <?= (@$info->purpose==5)?'checked':''?>/>
MENTION TRAVAILLEUR TEMPORAIRE </td>
            </tr>
        <tr class="odd">
            <td colspan="5">RUBRIQUES A COMPLETER DES L’ENTREE EN FRANCE ET AVANT L’ENVOI A L’OFI I
              <br />
              joindre à votre envoi copie des pages de votre passeport relatives à votre état civil, votre visa et au passage de la frontière (cachet du
poste frontière)</td>
        </tr>
        <tr class="even">
            <td colspan="5">ADRESSE EN FRANCE :<br />
              <br />
              CHEZ 
              <input type="text" name="chez" value="<?= @$info->chez?>" />              
               BATIMENT 
              <input type="text" name="batiment" value="<?= @$info->batiment?>" />              
               NUMERO 
              <input type="text" name="numero" value="<?= @$info->numero?>" />
              <br />
              RUE 
              <input name="pue" type="text" value="<?= @$info->pue?>" style="width:500px" />
              <br />
              CODE POSTAL 
              <input type="text" name="postal" value="<?= @$info->postal?>" />              
               VILLE 
              <input type="text" name="ville" value="<?= @$info->ville?>" />
              <br />
              TELEPHONE &nbsp;&nbsp;&nbsp;Fixe 
              <input type="text" name="fixe" value="<?= @$info->fixe?>" />              
               Portable 
              <input type="text" name="portable" value="<?= @$info->portable?>" />              
               <br />
               ADRESSE MESSAGERIE 
              <input name="email" type="text" value="<?= @$info->email?>" id="email" />
              <br />
              LANGUE(S) rubrique à compléter par les conjoints de Français et les titulaires d’un visa mention « salarié ».<br />
              Comprise (s) à l’oral 
              <input name="comprise" type="text" value="<?= @$info->comprise?>" style="width:500px" /> <br />
              Parlée(s) 
              <input name="parlee" type="text" value="<?= @$info->parlee?>" style="width:500px" /></td>
        </tr>
		        <tr class="odd">
            <td colspan="5">VISA :<br />
              <br />
              NUMERO 
              <input type="text" name="visa_num" value="<?= @$info->visa_num?>" />              
               VALABLE DU 
               <input type="text" name="visa_from" value="<?= @$info->visa_from?>" id="visa_from" />               
                AU 
                <input type="text" name="visa_to" value="<?= @$info->visa_to?>" id="visa_to" />                <br />
                DATE D’ENTREE EN FRANCE 
                <input type="text" name="visa_date" value="<?= @$info->visa_date?>" id="visa_date" />
                </td>
		        </tr>
        <tr class="even">
            <td colspan="5">CADRE RESERVEA L’OFII<br />
              <br />
              RE/DT 
              <input type="text" name="redt" value="<?= @$info->redt?>" /> <br />
              NUMERO DOSSIER OFI I: 
              <input type="text" name="dossier" value="<?= @$info->dossier?>" />              
               RECU LE 
              <input type="text" name="recule" value="<?= @$info->recule?>" id="recule" /></td>
           
        </tr>		
        <tr class="odd">
            <td colspan="5">&nbsp;</td>
         </tr>
    </tbody>
	</table>
<!-- table end -->
</form>

			</div>
		</div>
		
		<?=$this->load->view('include_sidebar',array('id'=>$id,'forms'=>$forms))?>
	</div>

<script type="text/javascript">
$().ready(function() {
  $("#form").validate({
    rules: {
		surname:"required",
		firstname:"required",
		birth_y:"required",
		birth_m:"required",
		birth_d:"required",
		birth_place:"required",
		birth_country:"required",
		nationality:"required",
		sex:"required",
		marital_status:"required",
		travel_document_type:"required",
		travel_document_num:"required",
		travel_document_issue_date:"required",
		travel_document_issue_place:"required",
		purpose:"required"
    }
  });
  
	$.datepicker.setDefaults(
		{
		dateFormat: 'dd/mm/yy',
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
		}
	);

	$("#travel_document_issue_date").datepicker();
	$("#visa_from").datepicker();
	$("#visa_to").datepicker();
	$("#visa_date").datepicker();
	$("#recule").datepicker();
	
	$("#email").autoMail();
	

	$("#printInfo").click(function(o) {
		var prints = [
			{rel_id: <?=$cateid?>, rec_id: <?=$id?>}
		]  ;
		
		var jdata = JSON.stringify(prints);
		//alert(jdata);
		$.post("<?=site_url('proxy/does/'.str_replace('==','',base64_encode('http://'.$_SERVER['SERVER_NAME'].':9090/javaprduct/servlet/test')))?>",{clients:jdata},function(msg){alert(msg)});
	});
	
	$("#printInfo").ajaxError(function(event,request, settings){
		//$(this).append("<li>出错页面:" + settings.url + "</li>");
		alert("无法访问"+ settings.url );
	}); 
 
});
</script>

<?=$this->load->view('include_footer',null)?>